package com.autumn.annotations.bean.config.factorybean;

import org.springframework.beans.factory.FactoryBean;

/**
 * ClassName: ColorFactoryBean
 *
 * @Description:
 * @Author: wangqiuyang
 * @Date: 2022/1/25 2:07 下午
 * History:
 * <author>          <time>          <version>          <desc>
 * wangqiuyang    2022/1/25 2:07 下午   @Version 1.0        描述
 */
public class ColorFactoryBean implements FactoryBean<Color> {


    @Override
    public Color getObject() throws Exception {
        System.out.println("ColorFactoryBean.getObject() 方法被调用");
        return new Color();
    }

    @Override
    public Class<?> getObjectType() {
        return Color.class;
    }

    /**
    * Description: 返回给ioc的实例是否为单例的
    * @param
    * @return: boolean
    * @author: wangqiuyang
    * @Date: 2022/1/25 2:11 下午
    */
    @Override
    public boolean isSingleton() {
        return true;
    }
}
